#include <iostream>
#include <cstdlib>
#include <vector>
using namespace std;

void my_erase(vector<string>& vs){
	if (vs.size()>0)
			vs.erase(vs.begin());
}

int main(){
	string strarr[]={"","Rong"}; // but {"","Rong"} is not a valid expression in other context except assignment
	// cout << sizeof strarr <<endl;
	vector<string> vs(strarr, strarr+2); // no possible to get the length of a dynamic array unless the type is primitive (fix size) 
	cout << vs.size() <<endl;
	vector<string> v2=vs; // vector assignment is deep copy
	v2[0]="Xiao";
	cout << vs[0] << endl;
	cout << v2.size() <<endl;
	my_erase(v2);
	cout << v2.size() <<endl;
	my_erase(v2);
	cout << v2.size() <<endl;
	cout << v2[0] << endl; // It Is
	cout << v2[1] << endl; // Weird

	char* str = (char*) malloc(5 * sizeof(char));// "My name is Rong!";
	char str2 [] = "My name is Rong!";
	str[0]='M';
	str[1]='y';
	str[2]=' ';
	str[4]='\0';
	// str[5]='\0';
	// str[6]='s';
	str[3]='s';
	cout << str << endl;
	cout << sizeof str2 << endl;
	cout << str2+14 << endl;
	free(str);
	return 0;
}

